# include "graphColoring.h"
# include <stdio.h>

static int n = 5;
int colors[5];

int main (int argc, char *argv[]) {
	int i,j;
	Graph *tmp,*g = newGraph(n);
	g->maxColors = 2;
	int validNodes[n];
	for (i=0;i<n;i++) validNodes[i] = 1;
	// Construção do grafo de testes
	for (i=0;i<n;i++)
		for (j=0;j<n;j++)
			if (j%2) {
				if (i!=j) printf("%d | %d\n",i,j);
				createEdge(g,i,j);
			}
	for (i=0;i<n;i++) colors[i] = 0;
	LinkedList *lst = getConnectedSubGraphs(g);
	while (lst) {
		tmp = getData(lst);
		for (i=0;i<tmp->nodes;i++) {
			for (j=0;j<tmp->nodes;j++) if (adjacent(tmp,i,j)) printf("%d - %d\n",i,j);
		}
		lst = lst->next;
	}
	//printf("TOTAL: %d\n",res);
	//for (i=0;i<n;i++)
	//	printf("Nodo %d com cor %d\n",i,g->color[i]);
	return 0;
}
